<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--   引用标签不能写js代码-->
    <script src="../js/jquery-1.12.4.min.js"></script>
    <script>
        $(function () {
            var $div = $('#div01');
            var $div2 = $('.box');
            var $li = $('li');
            var $span = $('.box span');
            // 属性选择器
            var $div3 = $('div[class="box2"]');

            // 对选择的元素进行样式操作
            $div.css({color:'red'}, {font_size:30},);
            $div2.css({color:'green'});
            $li.css({color:'yellow'});
            $span.css({color:'pink'});
            $div3.css({color:'blue'});
        })

    </script>
</head>
<body>
    <div id="div01">这是一个div</div>
    <div class="box">这是第二个<span>div</span></div>
    <div class="box">这是第三个div</div>
    <div class="box2">这是第四个</div>
    <ul>
        <li>dddd</li>
        <li>dddd</li>
        <li>dddd</li>
        <li>dddd</li>
        <li>dddd</li>
        <li>dddd</li>
    </ul>
</body>
</html>